from django.urls import path, include
from rest_framework.routers import DefaultRouter

from . import views

router = DefaultRouter()
router.register("users", views.ProfileViewSet)
router.register("users", views.UserPermissionViewSet)
router.register("roles", views.GroupViewSet, basename="role")

urlpatterns = [
    path(
        "login",
        views.CustomTokenObtainPairView.as_view(),
        name="token_obtain_pair",
    ),
    path("", include(router.urls)),
]
